/**
 * 
 */
package pt.inescid.components.console.commands;

import pt.inescid.components.console.Console;

/**
 * @author Sergio Esteves
 *
 */
public class ShowNeighborsCommand extends Command {

	public static final String CMD_NAME = "show_neighbors";
	
	public ShowNeighborsCommand(Console console) {
		super(console);
	}
	
	@Override
	public void execute(String[] args) throws CommandException {
		console.writeln(gridP2P.getNeighborsDescription());
	}
	
	@Override
	public String getCmdName() {
		return CMD_NAME;
	}

	@Override
	public String synopsis() {
		return CMD_NAME + SYNTAX_SEPARATOR + 
		"Shows neighbors and their resources";
	}
}
